package com.demo.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.demo.entity.User;
import com.demo.service.UserService;


@RestController
public class UserController {

	@Autowired
	UserService userservice;
	
	@RequestMapping("/users")
	public List<User> findAlls()
	{ 
		return userservice.findAll();
		
	}
	
}
